package cn.sanshuilin.kst.system.provider.write.dao;


import cn.sanshuilin.kst.system.provider.bean.Attention;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;

/**
 * 创建提示信息dao层
 * @author xutao
 * @version V1.0 创建时间：2017/11/23 23:35
 *          Copyright 2017 by 言午工作室
 */

public interface AttentionDao extends JpaRepository<Attention,String> {

    Attention findByPubMemberIdAndObjId(String pubMemberId, String objId);
    @Transactional
    @Modifying
    @Query(value = "DELETE FROM Attention WHERE ID =:ID",nativeQuery = true)
    int removeById(@Param("ID") String ID);
}
